class Valkyrie:
    def __init__(self, FP_name, FP_age, FP_role):
        self.__name = FP_name
        self.__age = FP_age
        self.__role = FP_role
    def get_name(self):
        return self.__name
    def get_age(self):
        return self.__age
    def get_role(self):
        return self.__role
    def set_name(self, FP_name):
    	self.__name = FP_name
    def set_age(self, FP_age):
        if(FP_age <= 0):
            raise ValueError("年龄不能小于等于0")
        else:
    	    self.__age = FP_age
    def set_role(self, FP_role):
    	self.__role = FP_role

Kiana = Valkyrie("琪亚娜", 17, "半辅半C")

# 不能直接访问
# print("信息：", Kiana.__name)

# 访问数据
name = Kiana.get_name()
print("信息：", name)

# 修改数据
Kiana.set_name("Kia")
name = Kiana.get_name()
print("信息：", name)

# 对传入参数进行检查
Kiana.set_age(0)